package com.spring.springbootmodel.exception;

import lombok.Getter;

/**
 * 作者：黄龙华
 * 功能：
 * 日期：2023/11/10 18:19
 */
@Getter
public class ServiceException extends RuntimeException {
    private final String code;

    public ServiceException(String msg) {
        super(msg);
        this.code = "500";  //默认的code
    }

    public ServiceException(String code, String msg) {
        super(msg);
        this.code = code;
    }
}